/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('easygene', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AbortRunRequest {
  runId?: string(name='RunId', description='This parameter is required.', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model AbortRunResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model AbortRunResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AbortRunResponseBody(name='body'),
}

/**
 * @summary 暂停任务
 *
 * @param request AbortRunRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AbortRunResponse
 */
async function abortRunWithOptions(request: AbortRunRequest, runtime: Util.RuntimeOptions): AbortRunResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.runId)) {
    query['RunId'] = request.runId;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AbortRun',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 暂停任务
 *
 * @param request AbortRunRequest
 * @return AbortRunResponse
 */
async function abortRun(request: AbortRunRequest): AbortRunResponse {
  var runtime = new Util.RuntimeOptions{};
  return abortRunWithOptions(request, runtime);
}

model AbortSubmissionRequest {
  submissionId?: string(name='SubmissionId', description='This parameter is required.', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model AbortSubmissionResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='easygene.cn-beijing.aliyuncs.com'),
}

model AbortSubmissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AbortSubmissionResponseBody(name='body'),
}

/**
 * @summary 取消投递
 *
 * @param request AbortSubmissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AbortSubmissionResponse
 */
async function abortSubmissionWithOptions(request: AbortSubmissionRequest, runtime: Util.RuntimeOptions): AbortSubmissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.submissionId)) {
    query['SubmissionId'] = request.submissionId;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AbortSubmission',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 取消投递
 *
 * @param request AbortSubmissionRequest
 * @return AbortSubmissionResponse
 */
async function abortSubmission(request: AbortSubmissionRequest): AbortSubmissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return abortSubmissionWithOptions(request, runtime);
}

model CopyPublicEntityRequest {
  dataset?: string(name='Dataset', description='This parameter is required.', example='TestDataset'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CopyPublicEntityResponseBody = {
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model CopyPublicEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CopyPublicEntityResponseBody(name='body'),
}

/**
 * @summary 拷贝公共数据集的数据表格
 *
 * @param request CopyPublicEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CopyPublicEntityResponse
 */
async function copyPublicEntityWithOptions(request: CopyPublicEntityRequest, runtime: Util.RuntimeOptions): CopyPublicEntityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataset)) {
    query['Dataset'] = request.dataset;
  }
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CopyPublicEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 拷贝公共数据集的数据表格
 *
 * @param request CopyPublicEntityRequest
 * @return CopyPublicEntityResponse
 */
async function copyPublicEntity(request: CopyPublicEntityRequest): CopyPublicEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return copyPublicEntityWithOptions(request, runtime);
}

model CreateAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  appType?: string(name='AppType', example='App'),
  clientToken?: string(name='ClientToken', example='TestToken'),
  configs?: [ 
    {
      content?: string(name='Content', example='{     "wgs.apply_bqsr.cpu": 4,     "wgs.apply_bqsr.disks": "local-disk 250 cloud_ssd",     "wgs.apply_bqsr.gatk_Launcher": "/usr/local/bin/gatk-4.1.4.1/gatk",     "wgs.apply_bqsr.java_opts": "\\\\"-XX:GCTimeLimit=50 -XX:GCHeapFreeLimit=10 -Xms3000m -Djava.io.tmpdir=/mnt\\\\"",     "wgs.apply_bqsr.memory": "8G"}'),
      path?: string(name='Path', example='./config/example.json'),
    }
  ](name='Configs'),
  definition?: string(name='Definition', description='This parameter is required.', example='import "./task/echo.wdl" as echo workflow wf_echo {   call echo.echo }'),
  dependencies?: [ 
    {
      content?: string(name='Content', example='task echo {   String txt_out = "default_txt_out"   String dd_out = "default_dd_out"    command {     echo Hello > ${txt_out}     /bin/bash -c "dd if=/dev/zero of=${dd_out} bs=1M count=15"     echo "This is a test std out."   }    runtime {     cpu: "2"     memory: "4G"     autoReleaseJob: false     reserveOnFail: true     userData: "key1 value1"     disks: "local-disk 40 cloud_ssd, /home/mount/ 40 cloud_efficiency"     tag: "TestTag"   }    output {     File outTxtFile = "${txt_out}"     File outDdFile = "${dd_out}"   } }'),
      path?: string(name='Path', example='./task/echo.wdl'),
    }
  ](name='Dependencies'),
  description?: string(name='Description', example='This is a test app'),
  documentation?: string(name='Documentation', example='Example documentation content'),
  labels?: string(name='Labels', example='{"key":"value"}'),
  language?: string(name='Language', example='WDL'),
  languageVersion?: string(name='LanguageVersion', example='1.0'),
  path?: string(name='Path', description='This parameter is required.', example='main.wdl'),
  revisionComment?: string(name='RevisionComment', example='Example revision comment'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model CreateAppShrinkRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  appType?: string(name='AppType', example='App'),
  clientToken?: string(name='ClientToken', example='TestToken'),
  configsShrink?: string(name='Configs'),
  definition?: string(name='Definition', description='This parameter is required.', example='import "./task/echo.wdl" as echo workflow wf_echo {   call echo.echo }'),
  dependenciesShrink?: string(name='Dependencies'),
  description?: string(name='Description', example='This is a test app'),
  documentation?: string(name='Documentation', example='Example documentation content'),
  labels?: string(name='Labels', example='{"key":"value"}'),
  language?: string(name='Language', example='WDL'),
  languageVersion?: string(name='LanguageVersion', example='1.0'),
  path?: string(name='Path', description='This parameter is required.', example='main.wdl'),
  revisionComment?: string(name='RevisionComment', example='Example revision comment'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model CreateAppResponseBody = {
  appName?: string(name='AppName', example='TestApp'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  revision?: string(name='Revision', example='1'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model CreateAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppResponseBody(name='body'),
}

/**
 * @summary 创建应用
 *
 * @param tmpReq CreateAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppResponse
 */
async function createAppWithOptions(tmpReq: CreateAppRequest, runtime: Util.RuntimeOptions): CreateAppResponse {
  Util.validateModel(tmpReq);
  var request = new CreateAppShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.configs)) {
    request.configsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configs, 'Configs', 'json');
  }
  if (!Util.isUnset(tmpReq.dependencies)) {
    request.dependenciesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dependencies, 'Dependencies', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appType)) {
    query['AppType'] = request.appType;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.languageVersion)) {
    query['LanguageVersion'] = request.languageVersion;
  }
  if (!Util.isUnset(request.path)) {
    query['Path'] = request.path;
  }
  if (!Util.isUnset(request.revisionComment)) {
    query['RevisionComment'] = request.revisionComment;
  }
  if (!Util.isUnset(request.revisionTag)) {
    query['RevisionTag'] = request.revisionTag;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.configsShrink)) {
    body['Configs'] = request.configsShrink;
  }
  if (!Util.isUnset(request.definition)) {
    body['Definition'] = request.definition;
  }
  if (!Util.isUnset(request.dependenciesShrink)) {
    body['Dependencies'] = request.dependenciesShrink;
  }
  if (!Util.isUnset(request.documentation)) {
    body['Documentation'] = request.documentation;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建应用
 *
 * @param request CreateAppRequest
 * @return CreateAppResponse
 */
async function createApp(request: CreateAppRequest): CreateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppWithOptions(request, runtime);
}

model CreateEntityRequest {
  clientToken?: string(name='ClientToken', example='T93cy1mMDE4OTgxNGU1ZTkK'),
  entityItems?: [ 
    {
      entityData?: map[string]string(name='EntityData'),
      entityName?: string(name='EntityName', example='s1'),
    }
  ](name='EntityItems', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CreateEntityShrinkRequest {
  clientToken?: string(name='ClientToken', example='T93cy1mMDE4OTgxNGU1ZTkK'),
  entityItemsShrink?: string(name='EntityItems', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CreateEntityResponseBody = {
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model CreateEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateEntityResponseBody(name='body'),
}

/**
 * @summary 创建数据表格
 *
 * @param tmpReq CreateEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateEntityResponse
 */
async function createEntityWithOptions(tmpReq: CreateEntityRequest, runtime: Util.RuntimeOptions): CreateEntityResponse {
  Util.validateModel(tmpReq);
  var request = new CreateEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.entityItems)) {
    request.entityItemsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.entityItems, 'EntityItems', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.entityItemsShrink)) {
    body['EntityItems'] = request.entityItemsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建数据表格
 *
 * @param request CreateEntityRequest
 * @return CreateEntityResponse
 */
async function createEntity(request: CreateEntityRequest): CreateEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return createEntityWithOptions(request, runtime);
}

model CreateRunRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='Sentieon'),
  appRevision?: string(name='AppRevision', example='16'),
  clientToken?: string(name='ClientToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  defaultRuntime?: string(name='DefaultRuntime', example='{}'),
  description?: string(name='Description', example='test run'),
  executeDirectory?: string(name='ExecuteDirectory', example='oss://my-bucket/exec/'),
  executeOptions?: {
    callCaching?: boolean(name='CallCaching', example='True'),
    dataLoader?: string(name='DataLoader', example='Mount'),
    deleteIntermediateResults?: boolean(name='DeleteIntermediateResults', example='True'),
    failureMode?: string(name='FailureMode', example='NoNewCalls'),
    useRelativeOutputPaths?: boolean(name='UseRelativeOutputPaths', example='True'),
  }(name='ExecuteOptions', example='{ 	"CallCaching": true,     "FailureMode": "NoNewCalls" }'),
  inputs?: string(name='Inputs', description='This parameter is required.', example='{         "workflow1.task1.param1": "helloooo.txt",         "workflow1.task1.param2": "abc",         "workflow1.task2.param1": "new_helloooo.txt",         "workflow1.task2.param2": "def"     }'),
  labels?: string(name='Labels', example='{"env": "test"}'),
  outputFolder?: string(name='OutputFolder', example='oss://my-bucket/output/'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  role?: string(name='Role', example='TestRole'),
  runName?: string(name='RunName', example='wgs_sentieon_hc_with_qc_NGPTS1900029301'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CreateRunShrinkRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='Sentieon'),
  appRevision?: string(name='AppRevision', example='16'),
  clientToken?: string(name='ClientToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  defaultRuntime?: string(name='DefaultRuntime', example='{}'),
  description?: string(name='Description', example='test run'),
  executeDirectory?: string(name='ExecuteDirectory', example='oss://my-bucket/exec/'),
  executeOptionsShrink?: string(name='ExecuteOptions', example='{ 	"CallCaching": true,     "FailureMode": "NoNewCalls" }'),
  inputs?: string(name='Inputs', description='This parameter is required.', example='{         "workflow1.task1.param1": "helloooo.txt",         "workflow1.task1.param2": "abc",         "workflow1.task2.param1": "new_helloooo.txt",         "workflow1.task2.param2": "def"     }'),
  labels?: string(name='Labels', example='{"env": "test"}'),
  outputFolder?: string(name='OutputFolder', example='oss://my-bucket/output/'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  role?: string(name='Role', example='TestRole'),
  runName?: string(name='RunName', example='wgs_sentieon_hc_with_qc_NGPTS1900029301'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CreateRunResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  runId?: string(name='RunId', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model CreateRunResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRunResponseBody(name='body'),
}

/**
 * @summary 创建任务
 *
 * @param tmpReq CreateRunRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRunResponse
 */
async function createRunWithOptions(tmpReq: CreateRunRequest, runtime: Util.RuntimeOptions): CreateRunResponse {
  Util.validateModel(tmpReq);
  var request = new CreateRunShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.executeOptions)) {
    request.executeOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.executeOptions, 'ExecuteOptions', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appRevision)) {
    query['AppRevision'] = request.appRevision;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.defaultRuntime)) {
    query['DefaultRuntime'] = request.defaultRuntime;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.executeDirectory)) {
    query['ExecuteDirectory'] = request.executeDirectory;
  }
  if (!Util.isUnset(request.executeOptionsShrink)) {
    query['ExecuteOptions'] = request.executeOptionsShrink;
  }
  if (!Util.isUnset(request.inputs)) {
    query['Inputs'] = request.inputs;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.outputFolder)) {
    query['OutputFolder'] = request.outputFolder;
  }
  if (!Util.isUnset(request.revisionTag)) {
    query['RevisionTag'] = request.revisionTag;
  }
  if (!Util.isUnset(request.role)) {
    query['Role'] = request.role;
  }
  if (!Util.isUnset(request.runName)) {
    query['RunName'] = request.runName;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateRun',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建任务
 *
 * @param request CreateRunRequest
 * @return CreateRunResponse
 */
async function createRun(request: CreateRunRequest): CreateRunResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRunWithOptions(request, runtime);
}

model CreateSubmissionRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  clientToken?: string(name='ClientToken', example='TestToken'),
  defaultRuntime?: string(name='DefaultRuntime', example='{}'),
  entityNames?: [ string ](name='EntityNames', nullable=false),
  entityType?: string(name='EntityType', description='This parameter is required.', example='TestEntityType'),
  executeDirectory?: string(name='ExecuteDirectory', example='oss://my-bucket/my-exe-dir/'),
  executeOptions?: string(name='ExecuteOptions', example='{ 	        "CallCaching": false, 	        "DeleteIntermediateResults": true, 	        "FailureMode": "NoNewCalls"         }'),
  inputs?: string(name='Inputs', example='{}'),
  outputFolder?: string(name='OutputFolder', example='oss://my-bucket/my-output-dir/'),
  outputs?: string(name='Outputs', example='{}'),
  revision?: string(name='Revision', example='1'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model CreateSubmissionShrinkRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  clientToken?: string(name='ClientToken', example='TestToken'),
  defaultRuntime?: string(name='DefaultRuntime', example='{}'),
  entityNamesShrink?: string(name='EntityNames', nullable=false),
  entityType?: string(name='EntityType', description='This parameter is required.', example='TestEntityType'),
  executeDirectory?: string(name='ExecuteDirectory', example='oss://my-bucket/my-exe-dir/'),
  executeOptions?: string(name='ExecuteOptions', example='{ 	        "CallCaching": false, 	        "DeleteIntermediateResults": true, 	        "FailureMode": "NoNewCalls"         }'),
  inputs?: string(name='Inputs', example='{}'),
  outputFolder?: string(name='OutputFolder', example='oss://my-bucket/my-output-dir/'),
  outputs?: string(name='Outputs', example='{}'),
  revision?: string(name='Revision', example='1'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model CreateSubmissionResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model CreateSubmissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSubmissionResponseBody(name='body'),
}

/**
 * @summary 创建提交
 *
 * @param tmpReq CreateSubmissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSubmissionResponse
 */
async function createSubmissionWithOptions(tmpReq: CreateSubmissionRequest, runtime: Util.RuntimeOptions): CreateSubmissionResponse {
  Util.validateModel(tmpReq);
  var request = new CreateSubmissionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.entityNames)) {
    request.entityNamesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.entityNames, 'EntityNames', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.defaultRuntime)) {
    query['DefaultRuntime'] = request.defaultRuntime;
  }
  if (!Util.isUnset(request.entityNamesShrink)) {
    query['EntityNames'] = request.entityNamesShrink;
  }
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.executeDirectory)) {
    query['ExecuteDirectory'] = request.executeDirectory;
  }
  if (!Util.isUnset(request.executeOptions)) {
    query['ExecuteOptions'] = request.executeOptions;
  }
  if (!Util.isUnset(request.inputs)) {
    query['Inputs'] = request.inputs;
  }
  if (!Util.isUnset(request.outputFolder)) {
    query['OutputFolder'] = request.outputFolder;
  }
  if (!Util.isUnset(request.outputs)) {
    query['Outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.revision)) {
    query['Revision'] = request.revision;
  }
  if (!Util.isUnset(request.revisionTag)) {
    query['RevisionTag'] = request.revisionTag;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSubmission',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建提交
 *
 * @param request CreateSubmissionRequest
 * @return CreateSubmissionResponse
 */
async function createSubmission(request: CreateSubmissionRequest): CreateSubmissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSubmissionWithOptions(request, runtime);
}

model CreateTemplateRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='MyApp'),
  appRevision?: string(name='AppRevision', example='4.1.4.1-v1.0'),
  clientToken?: string(name='ClientToken', example='GFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  description?: string(name='Description', example='This is a test template'),
  inputsExpression?: [ 
    {
      help?: string(name='Help', example='test help'),
      required?: boolean(name='Required', description='This parameter is required.', example='true'),
      stepOrder?: int32(name='StepOrder', example='0'),
      taskName?: string(name='TaskName', description='This parameter is required.', example='Task1'),
      variableName?: string(name='VariableName', description='This parameter is required.', example='fastq1'),
      variableType?: string(name='VariableType', description='This parameter is required.', example='File'),
      variableValue?: string(name='VariableValue', description='This parameter is required.', example='oss://bucket/file1.fastq'),
    }
  ](name='InputsExpression', description='This parameter is required.'),
  labels?: string(name='Labels', example='{"key1": "value1"}'),
  outputsExpression?: [ 
    {
      help?: string(name='Help', example='test help'),
      required?: boolean(name='Required', description='This parameter is required.', example='true'),
      stepOrder?: int32(name='StepOrder', example='1'),
      taskName?: string(name='TaskName', description='This parameter is required.', example='Task1'),
      variableName?: string(name='VariableName', description='This parameter is required.', example='bam'),
      variableType?: string(name='VariableType', description='This parameter is required.', example='File'),
      variableValue?: string(name='VariableValue', description='This parameter is required.', example='oss://bucket/file.bam'),
    }
  ](name='OutputsExpression', description='This parameter is required.'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  rootEntity?: string(name='RootEntity', example='TestEntity'),
  templateName?: string(name='TemplateName', description='This parameter is required.', example='test-template'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CreateTemplateShrinkRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='MyApp'),
  appRevision?: string(name='AppRevision', example='4.1.4.1-v1.0'),
  clientToken?: string(name='ClientToken', example='GFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  description?: string(name='Description', example='This is a test template'),
  inputsExpressionShrink?: string(name='InputsExpression', description='This parameter is required.'),
  labels?: string(name='Labels', example='{"key1": "value1"}'),
  outputsExpressionShrink?: string(name='OutputsExpression', description='This parameter is required.'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  rootEntity?: string(name='RootEntity', example='TestEntity'),
  templateName?: string(name='TemplateName', description='This parameter is required.', example='test-template'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model CreateTemplateResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  templateName?: string(name='TemplateName', example='test-template'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model CreateTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTemplateResponseBody(name='body'),
}

/**
 * @summary 创建应用模板
 *
 * @param tmpReq CreateTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTemplateResponse
 */
async function createTemplateWithOptions(tmpReq: CreateTemplateRequest, runtime: Util.RuntimeOptions): CreateTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new CreateTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.inputsExpression)) {
    request.inputsExpressionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.inputsExpression, 'InputsExpression', 'json');
  }
  if (!Util.isUnset(tmpReq.outputsExpression)) {
    request.outputsExpressionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.outputsExpression, 'OutputsExpression', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appRevision)) {
    query['AppRevision'] = request.appRevision;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.revisionTag)) {
    query['RevisionTag'] = request.revisionTag;
  }
  if (!Util.isUnset(request.rootEntity)) {
    query['RootEntity'] = request.rootEntity;
  }
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.inputsExpressionShrink)) {
    body['InputsExpression'] = request.inputsExpressionShrink;
  }
  if (!Util.isUnset(request.outputsExpressionShrink)) {
    body['OutputsExpression'] = request.outputsExpressionShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateTemplate',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建应用模板
 *
 * @param request CreateTemplateRequest
 * @return CreateTemplateResponse
 */
async function createTemplate(request: CreateTemplateRequest): CreateTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTemplateWithOptions(request, runtime);
}

model CreateWorkspaceRequest {
  clientToken?: string(name='ClientToken', example='TestToken'),
  description?: string(name='Description', example='This is a test workspace'),
  jobLifecycle?: int32(name='JobLifecycle', example='30'),
  labels?: string(name='Labels', example='{"key":"value"}'),
  role?: string(name='Role', example='TestRole'),
  storage?: string(name='Storage', description='This parameter is required.', example='oss://gstor-default-workspace-cn-shanghai-bae3193d/'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model CreateWorkspaceResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model CreateWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateWorkspaceResponseBody(name='body'),
}

/**
 * @summary 创建工作空间
 *
 * @param request CreateWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateWorkspaceResponse
 */
async function createWorkspaceWithOptions(request: CreateWorkspaceRequest, runtime: Util.RuntimeOptions): CreateWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.jobLifecycle)) {
    query['JobLifecycle'] = request.jobLifecycle;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.role)) {
    query['Role'] = request.role;
  }
  if (!Util.isUnset(request.storage)) {
    query['Storage'] = request.storage;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateWorkspace',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建工作空间
 *
 * @param request CreateWorkspaceRequest
 * @return CreateWorkspaceResponse
 */
async function createWorkspace(request: CreateWorkspaceRequest): CreateWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createWorkspaceWithOptions(request, runtime);
}

model DeleteAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  revision?: string(name='Revision', example='1'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model DeleteAppResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppResponseBody(name='body'),
}

/**
 * @summary 删除应用
 *
 * @param request DeleteAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppResponse
 */
async function deleteAppWithOptions(request: DeleteAppRequest, runtime: Util.RuntimeOptions): DeleteAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.revision)) {
    query['Revision'] = request.revision;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除应用
 *
 * @param request DeleteAppRequest
 * @return DeleteAppResponse
 */
async function deleteApp(request: DeleteAppRequest): DeleteAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppWithOptions(request, runtime);
}

model DeleteEntityRequest {
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='default-workspace'),
}

model DeleteEntityResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteEntityResponseBody(name='body'),
}

/**
 * @summary 删除实体表格
 *
 * @param request DeleteEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteEntityResponse
 */
async function deleteEntityWithOptions(request: DeleteEntityRequest, runtime: Util.RuntimeOptions): DeleteEntityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除实体表格
 *
 * @param request DeleteEntityRequest
 * @return DeleteEntityResponse
 */
async function deleteEntity(request: DeleteEntityRequest): DeleteEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEntityWithOptions(request, runtime);
}

model DeleteEntityItemsRequest {
  entityNames?: [ string ](name='EntityNames', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model DeleteEntityItemsShrinkRequest {
  entityNamesShrink?: string(name='EntityNames', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model DeleteEntityItemsResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteEntityItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteEntityItemsResponseBody(name='body'),
}

/**
 * @summary 删除数据表格的条目
 *
 * @param tmpReq DeleteEntityItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteEntityItemsResponse
 */
async function deleteEntityItemsWithOptions(tmpReq: DeleteEntityItemsRequest, runtime: Util.RuntimeOptions): DeleteEntityItemsResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteEntityItemsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.entityNames)) {
    request.entityNamesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.entityNames, 'EntityNames', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.entityNamesShrink)) {
    query['EntityNames'] = request.entityNamesShrink;
  }
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEntityItems',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除数据表格的条目
 *
 * @param request DeleteEntityItemsRequest
 * @return DeleteEntityItemsResponse
 */
async function deleteEntityItems(request: DeleteEntityItemsRequest): DeleteEntityItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEntityItemsWithOptions(request, runtime);
}

model DeleteRunRequest {
  runId?: string(name='RunId', description='This parameter is required.', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model DeleteRunResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteRunResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRunResponseBody(name='body'),
}

/**
 * @summary 删除任务
 *
 * @param request DeleteRunRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRunResponse
 */
async function deleteRunWithOptions(request: DeleteRunRequest, runtime: Util.RuntimeOptions): DeleteRunResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.runId)) {
    query['RunId'] = request.runId;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRun',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除任务
 *
 * @param request DeleteRunRequest
 * @return DeleteRunResponse
 */
async function deleteRun(request: DeleteRunRequest): DeleteRunResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRunWithOptions(request, runtime);
}

model DeleteSubmissionRequest {
  submissionId?: string(name='SubmissionId', description='This parameter is required.', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model DeleteSubmissionResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteSubmissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSubmissionResponseBody(name='body'),
}

/**
 * @summary 删除投递
 *
 * @param request DeleteSubmissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSubmissionResponse
 */
async function deleteSubmissionWithOptions(request: DeleteSubmissionRequest, runtime: Util.RuntimeOptions): DeleteSubmissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.submissionId)) {
    query['SubmissionId'] = request.submissionId;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSubmission',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除投递
 *
 * @param request DeleteSubmissionRequest
 * @return DeleteSubmissionResponse
 */
async function deleteSubmission(request: DeleteSubmissionRequest): DeleteSubmissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSubmissionWithOptions(request, runtime);
}

model DeleteTemplateRequest {
  templateName?: string(name='TemplateName', description='This parameter is required.', example='test-template'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model DeleteTemplateResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTemplateResponseBody(name='body'),
}

/**
 * @summary 删除应用模板
 *
 * @param request DeleteTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTemplateResponse
 */
async function deleteTemplateWithOptions(request: DeleteTemplateRequest, runtime: Util.RuntimeOptions): DeleteTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTemplate',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除应用模板
 *
 * @param request DeleteTemplateRequest
 * @return DeleteTemplateResponse
 */
async function deleteTemplate(request: DeleteTemplateRequest): DeleteTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTemplateWithOptions(request, runtime);
}

model DeleteWorkspaceRequest {
  workspace?: string(name='Workspace', description='This parameter is required.', example='MyTestWorkspace'),
}

model DeleteWorkspaceResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DeleteWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteWorkspaceResponseBody(name='body'),
}

/**
 * @summary 删除工作空间
 *
 * @param request DeleteWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteWorkspaceResponse
 */
async function deleteWorkspaceWithOptions(request: DeleteWorkspaceRequest, runtime: Util.RuntimeOptions): DeleteWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteWorkspace',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除工作空间
 *
 * @param request DeleteWorkspaceRequest
 * @return DeleteWorkspaceResponse
 */
async function deleteWorkspace(request: DeleteWorkspaceRequest): DeleteWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteWorkspaceWithOptions(request, runtime);
}

model DownloadEntityRequest {
  entityNames?: [ string ](name='EntityNames'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model DownloadEntityShrinkRequest {
  entityNamesShrink?: string(name='EntityNames'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model DownloadEntityResponseBody = {
  entityCSVFile?: string(name='EntityCSVFile', example='https://my-bucket.oss.aliyucs.com/entity.csv'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model DownloadEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadEntityResponseBody(name='body'),
}

/**
 * @summary 下载数据表格
 *
 * @param tmpReq DownloadEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadEntityResponse
 */
async function downloadEntityWithOptions(tmpReq: DownloadEntityRequest, runtime: Util.RuntimeOptions): DownloadEntityResponse {
  Util.validateModel(tmpReq);
  var request = new DownloadEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.entityNames)) {
    request.entityNamesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.entityNames, 'EntityNames', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.entityNamesShrink)) {
    query['EntityNames'] = request.entityNamesShrink;
  }
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DownloadEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载数据表格
 *
 * @param request DownloadEntityRequest
 * @return DownloadEntityResponse
 */
async function downloadEntity(request: DownloadEntityRequest): DownloadEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadEntityWithOptions(request, runtime);
}

model GetAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  revision?: string(name='Revision', example='0'),
  revisionTag?: string(name='RevisionTag', example='TestTag'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model GetAppResponseBody = {
  appName?: string(name='AppName', example='MyTestApp'),
  appType?: string(name='AppType', example='App'),
  configs?: [ 
    {
      content?: string(name='Content', example='{     "wgs.apply_bqsr.cpu": 4,     "wgs.apply_bqsr.disks": "local-disk 250 cloud_ssd",     "wgs.apply_bqsr.gatk_Launcher": "/usr/local/bin/gatk-4.1.4.1/gatk",     "wgs.apply_bqsr.java_opts": "\\\\"-XX:GCTimeLimit=50 -XX:GCHeapFreeLimit=10 -Xms3000m -Djava.io.tmpdir=/mnt\\\\"",     "wgs.apply_bqsr.memory": "8G"}'),
      path?: string(name='Path', example='./config/example.json'),
    }
  ](name='Configs'),
  createTime?: string(name='CreateTime', example='2021-06-16T15:09:14.378297+08:00'),
  definition?: string(name='Definition', example='WDL content'),
  dependencies?: [ 
    {
      content?: string(name='Content', example='task echo {   String txt_out = "default_txt_out"   String dd_out = "default_dd_out"    command {     echo Hello > ${txt_out}     /bin/bash -c "dd if=/dev/zero of=${dd_out} bs=1M count=15"     echo "This is a test std out."   }    runtime {     cpu: "2"     memory: "4G"     autoReleaseJob: false     reserveOnFail: true     userData: "key1 value1"     disks: "local-disk 40 cloud_ssd, /home/mount/ 40 cloud_efficiency"     tag: "TestTag"   }    output {     File outTxtFile = "${txt_out}"     File outDdFile = "${dd_out}"   } }'),
      path?: string(name='Path', example='./task/echo.wdl'),
    }
  ](name='Dependencies'),
  description?: string(name='Description', example='This is a test app'),
  documentation?: string(name='Documentation', example='example documentation content'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  inputs?: [ 
    {
      help?: string(name='Help', example='help information'),
      required?: boolean(name='Required', example='true'),
      stepOrder?: long(name='StepOrder', example='1'),
      taskName?: string(name='TaskName', example='TestTaskName'),
      variableName?: string(name='VariableName', example='TestVariableName'),
      variableType?: string(name='VariableType', example='TestVariableType'),
      variableValue?: string(name='VariableValue', example='TestVariableValue'),
    }
  ](name='Inputs'),
  labels?: map[string]string(name='Labels'),
  language?: string(name='Language', example='WDL'),
  languageVersion?: string(name='LanguageVersion', example='1.0'),
  lastModifiedTime?: string(name='LastModifiedTime', example='2021-06-16T15:09:14.378297+08:00'),
  outputs?: [ 
    {
      help?: string(name='Help', example='Example help information'),
      required?: boolean(name='Required', example='true'),
      stepOrder?: long(name='StepOrder', example='1'),
      taskName?: string(name='TaskName', example='TestTaskName'),
      variableName?: string(name='VariableName', example='TestVariableName'),
      variableType?: string(name='VariableType', example='Int'),
      variableValue?: string(name='VariableValue', example='ExampleValue'),
    }
  ](name='Outputs'),
  path?: string(name='Path', example='main.wdl'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  revision?: string(name='Revision', example='1'),
  revisionComment?: string(name='RevisionComment', example='Example revision comment'),
  revisionTag?: string(name='RevisionTag', example='TestTag'),
  revisions?: [ 
    {
      createTime?: string(name='CreateTime', example='2021-06-16T15:09:14.378297+08:00'),
      revision?: string(name='Revision', example='1'),
      revisionComment?: string(name='RevisionComment', example='Example revision comment'),
      revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
    }
  ](name='Revisions'),
  scope?: string(name='Scope', example='Public'),
  source?: string(name='Source', example='EasyGene'),
  URL?: string(name='URL', example='Example url'),
  workflowName?: string(name='WorkflowName', example='MyTestWorkflow'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model GetAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAppResponseBody(name='body'),
}

/**
 * @summary 查询应用详情
 *
 * @param request GetAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAppResponse
 */
async function getAppWithOptions(request: GetAppRequest, runtime: Util.RuntimeOptions): GetAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.revision)) {
    query['Revision'] = request.revision;
  }
  if (!Util.isUnset(request.revisionTag)) {
    query['RevisionTag'] = request.revisionTag;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询应用详情
 *
 * @param request GetAppRequest
 * @return GetAppResponse
 */
async function getApp(request: GetAppRequest): GetAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAppWithOptions(request, runtime);
}

model GetEntityRequest {
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model GetEntityResponseBody = {
  attributes?: [ string ](name='Attributes'),
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='100'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model GetEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetEntityResponseBody(name='body'),
}

/**
 * @summary 查询数据表格信息
 *
 * @param request GetEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetEntityResponse
 */
async function getEntityWithOptions(request: GetEntityRequest, runtime: Util.RuntimeOptions): GetEntityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询数据表格信息
 *
 * @param request GetEntityRequest
 * @return GetEntityResponse
 */
async function getEntity(request: GetEntityRequest): GetEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEntityWithOptions(request, runtime);
}

model GetGlobalAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='joint-calling'),
  appVersion?: string(name='AppVersion', example='1.0'),
  attributes?: [ string ](name='Attributes', example='AppVersion, AppDescriptorFiles, DescriptorType, DAG, Document, Comment, Alias, NamespaceName, AppScope, AppName, AppDescription, RegionIds, Categories, Toolkit, AppVersions, AppDefaultVersion, AppFee, LastModified, Pinned, Contact, Links, AppType'),
  location?: string(name='Location', example='cn-shenzhen'),
  namespaceName?: string(name='NamespaceName', description='This parameter is required.', example='sentieon'),
}

model GetGlobalAppShrinkRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='joint-calling'),
  appVersion?: string(name='AppVersion', example='1.0'),
  attributesShrink?: string(name='Attributes', example='AppVersion, AppDescriptorFiles, DescriptorType, DAG, Document, Comment, Alias, NamespaceName, AppScope, AppName, AppDescription, RegionIds, Categories, Toolkit, AppVersions, AppDefaultVersion, AppFee, LastModified, Pinned, Contact, Links, AppType'),
  location?: string(name='Location', example='cn-shenzhen'),
  namespaceName?: string(name='NamespaceName', description='This parameter is required.', example='sentieon'),
}

model GetGlobalAppResponseBody = {
  appDefaultVersion?: string(name='AppDefaultVersion', example='1.0'),
  appDescription?: string(name='AppDescription', example='This is app description.'),
  appDescriptorFiles?: [ 
    {
      checksum?: string(name='Checksum'),
      content?: string(name='Content'),
      fileType?: string(name='FileType', example='PRIMARY_DESCRIPTOR（主WDL） SECONDARY_DESCRIPTOR（依赖WDL）  CONFIG（推荐的输入参数）  CONTAINERFILE（镜像制作文件）  DATA（输入参数中引用的参考文件）  OTHER（其他）'),
      path?: string(name='Path', example='./main.wdl'),
      url?: string(name='Url'),
    }
  ](name='AppDescriptorFiles'),
  appDescriptorType?: string(name='AppDescriptorType', example='WDL / CWL'),
  appFee?: string(name='AppFee', example='实际使用时，计算该应用消耗的资源费用'),
  appName?: string(name='AppName', example='joint-calling'),
  appScope?: string(name='AppScope', example='OpenAccess / Protected'),
  appType?: string(name='AppType', example='workflow'),
  appVersion?: string(name='AppVersion', example='1.2a-3'),
  appVersions?: [ 
    {
      appVersion?: string(name='AppVersion', example='1.0'),
      comment?: string(name='Comment', example='初始版本'),
      lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
    }
  ](name='AppVersions'),
  categories?: [ string ](name='Categories'),
  comment?: string(name='Comment', example='初始版本'),
  contact?: string(name='Contact', example='support@sentieon.com'),
  DAG?: string(name='DAG', example='DAG'),
  document?: string(name='Document', example='The app details.'),
  hostId?: string(name='HostId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
  links?: [ string ](name='Links'),
  locations?: [ string ](name='Locations'),
  namespaceName?: string(name='NamespaceName', example='sentieon'),
  pinned?: boolean(name='Pinned', example='true'),
  requestId?: string(name='RequestId', example='easygene.cn-beijing.aliyuncs.com'),
  toolkit?: string(name='Toolkit', example='Sentieon'),
}

model GetGlobalAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetGlobalAppResponseBody(name='body'),
}

/**
 * @summary 查询平台公共应用详情
 *
 * @param tmpReq GetGlobalAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetGlobalAppResponse
 */
async function getGlobalAppWithOptions(tmpReq: GetGlobalAppRequest, runtime: Util.RuntimeOptions): GetGlobalAppResponse {
  Util.validateModel(tmpReq);
  var request = new GetGlobalAppShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.attributes)) {
    request.attributesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.attributes, 'Attributes', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetGlobalApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询平台公共应用详情
 *
 * @param request GetGlobalAppRequest
 * @return GetGlobalAppResponse
 */
async function getGlobalApp(request: GetGlobalAppRequest): GetGlobalAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return getGlobalAppWithOptions(request, runtime);
}

model GetPublicDatasetRequest {
  attributes?: [ string ](name='Attributes'),
  datasetName?: string(name='DatasetName', description='This parameter is required.', example='西蒙斯基因组多样性计划'),
}

model GetPublicDatasetShrinkRequest {
  attributesShrink?: string(name='Attributes'),
  datasetName?: string(name='DatasetName', description='This parameter is required.', example='西蒙斯基因组多样性计划'),
}

model GetPublicDatasetResponseBody = {
  about?: string(name='About', example='This is description about dataset.'),
  accessRequirements?: string(name='AccessRequirements', example='This are dataset access requirements.'),
  copyright?: string(name='Copyright', example='This is dataset copyright.'),
  datasetDescription?: string(name='DatasetDescription', example='This is dataset description.'),
  datasetName?: string(name='DatasetName', example='西蒙斯基因组多样性计划'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
  locations?: [ string ](name='Locations'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  tags?: [ string ](name='Tags'),
  updateFrequency?: string(name='UpdateFrequency', example='源站更新后及时同步'),
}

model GetPublicDatasetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPublicDatasetResponseBody(name='body'),
}

/**
 * @summary 查询平台公共数据集详情
 *
 * @param tmpReq GetPublicDatasetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPublicDatasetResponse
 */
async function getPublicDatasetWithOptions(tmpReq: GetPublicDatasetRequest, runtime: Util.RuntimeOptions): GetPublicDatasetResponse {
  Util.validateModel(tmpReq);
  var request = new GetPublicDatasetShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.attributes)) {
    request.attributesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.attributes, 'Attributes', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetPublicDataset',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询平台公共数据集详情
 *
 * @param request GetPublicDatasetRequest
 * @return GetPublicDatasetResponse
 */
async function getPublicDataset(request: GetPublicDatasetRequest): GetPublicDatasetResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPublicDatasetWithOptions(request, runtime);
}

model GetPublicDatasetEntityRequest {
  datasetName?: string(name='DatasetName', description='This parameter is required.', example='西蒙斯基因组多样性计划'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  location?: string(name='Location', example='cn-shanghai'),
}

model GetPublicDatasetEntityResponseBody = {
  attributes?: [ string ](name='Attributes'),
  datasetName?: string(name='DatasetName', example='西蒙斯基因组多样性计划'),
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model GetPublicDatasetEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPublicDatasetEntityResponseBody(name='body'),
}

/**
 * @summary 查询平台公共数据集特定的实体定义
 *
 * @param request GetPublicDatasetEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPublicDatasetEntityResponse
 */
async function getPublicDatasetEntityWithOptions(request: GetPublicDatasetEntityRequest, runtime: Util.RuntimeOptions): GetPublicDatasetEntityResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetPublicDatasetEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询平台公共数据集特定的实体定义
 *
 * @param request GetPublicDatasetEntityRequest
 * @return GetPublicDatasetEntityResponse
 */
async function getPublicDatasetEntity(request: GetPublicDatasetEntityRequest): GetPublicDatasetEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPublicDatasetEntityWithOptions(request, runtime);
}

model GetRunRequest {
  runId?: string(name='RunId', description='This parameter is required.', example='run-12kDbbqp5O9dfsH0sEdQeRclGQb'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='default-workspace'),
}

model GetRunResponseBody = {
  appName?: string(name='AppName', example='Sentieon'),
  appRevision?: string(name='AppRevision', example='1'),
  billingInstanceIds?: [ string ](name='BillingInstanceIds'),
  calls?: string(name='Calls', example='{}'),
  createTime?: string(name='CreateTime', example='2021-06-10T13:30:20.414557061Z'),
  defaultRuntime?: string(name='DefaultRuntime', example='{}'),
  description?: string(name='Description', example='test run'),
  endTime?: string(name='EndTime', example='2021-06-10T13:36:20.405878292Z'),
  entityName?: string(name='EntityName', example='s1'),
  entityType?: string(name='EntityType', example='sample'),
  executeDirectory?: string(name='ExecuteDirectory', example='oss://my-bucket/exec/'),
  executeOptions?: {
    callCaching?: boolean(name='CallCaching', example='false'),
    dataLoader?: string(name='DataLoader'),
    deleteIntermediateResults?: boolean(name='DeleteIntermediateResults', example='false'),
    failureMode?: string(name='FailureMode', example='NoNewCalls'),
    useRelativeOutputPaths?: boolean(name='UseRelativeOutputPaths', example='false'),
  }(name='ExecuteOptions'),
  failures?: string(name='Failures', example='{}'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  inputs?: string(name='Inputs', example='{     "workflow1.task1.param1": "helloooo.txt",     "workflow1.task1.param2": "abc",     "workflow1.task2.param1": "new_helloooo.txt",     "workflow1.task2.param2": "def" }'),
  labels?: map[string]string(name='Labels'),
  outputFolder?: string(name='OutputFolder', example='oss://my-bucket/output/'),
  outputs?: string(name='Outputs', example='{         "workflow1.bam": "oss://my-bucket/test.bam",         "workflow1.vcf": "oss://my-bucket/test.vcf"     }'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  runId?: string(name='RunId', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
  runName?: string(name='RunName', example='test-run'),
  source?: string(name='Source', example='EasyGene'),
  startTime?: string(name='StartTime', example='2021-06-10T13:30:24.414557061Z'),
  status?: string(name='Status', example='Running'),
  submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  timing?: string(name='Timing', example='{}'),
  user?: string(name='User', example='13579222'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model GetRunResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetRunResponseBody(name='body'),
}

/**
 * @summary 获取任务详情
 *
 * @param request GetRunRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetRunResponse
 */
async function getRunWithOptions(request: GetRunRequest, runtime: Util.RuntimeOptions): GetRunResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetRun',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取任务详情
 *
 * @param request GetRunRequest
 * @return GetRunResponse
 */
async function getRun(request: GetRunRequest): GetRunResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRunWithOptions(request, runtime);
}

model GetSubmissionRequest {
  submissionId?: string(name='SubmissionId', description='This parameter is required.', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model GetSubmissionResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  submission?: {
    createTime?: string(name='CreateTime', example='2021-06-16T15:09:14.378297+08:00'),
    endTime?: string(name='EndTime', example='2021-06-16T15:09:14.378297+08:00'),
    entityType?: string(name='EntityType', example='TestEntityType'),
    runStats?: {
      aborted?: long(name='Aborted', example='5'),
      aborting?: long(name='Aborting', example='5'),
      failed?: long(name='Failed', example='5'),
      pending?: long(name='Pending', example='5'),
      running?: long(name='Running', example='5'),
      submitted?: long(name='Submitted', example='5'),
      succeeded?: long(name='Succeeded', example='5'),
    }(name='RunStats'),
    startTime?: string(name='StartTime', example='2021-06-16T15:09:14.378297+08:00'),
    status?: string(name='Status', example='Succeeded'),
    submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
    workspace?: string(name='Workspace', example='TestWorkspace'),
  }(name='Submission'),
}

model GetSubmissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSubmissionResponseBody(name='body'),
}

/**
 * @summary 获取投递详情
 *
 * @param request GetSubmissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSubmissionResponse
 */
async function getSubmissionWithOptions(request: GetSubmissionRequest, runtime: Util.RuntimeOptions): GetSubmissionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSubmission',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取投递详情
 *
 * @param request GetSubmissionRequest
 * @return GetSubmissionResponse
 */
async function getSubmission(request: GetSubmissionRequest): GetSubmissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSubmissionWithOptions(request, runtime);
}

model GetTemplateRequest {
  templateName?: string(name='TemplateName', description='This parameter is required.', example='test-template'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model GetTemplateResponseBody = {
  appName?: string(name='AppName', example='MyApp'),
  appRevision?: string(name='AppRevision', example='1'),
  createTime?: string(name='CreateTime', example='2021-06-10T13:30:20.414557061Z'),
  description?: string(name='Description', example='test template'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  inputsExpression?: [ 
    {
      help?: string(name='Help', example='test help'),
      required?: boolean(name='Required', example='true'),
      stepOrder?: long(name='StepOrder', example='0'),
      taskName?: string(name='TaskName', example='Task1'),
      variableName?: string(name='VariableName', example='v1'),
      variableType?: string(name='VariableType', example='File'),
      variableValue?: string(name='VariableValue', example='oss://bucket/file1.fastq'),
    }
  ](name='InputsExpression'),
  labels?: map[string]string(name='Labels'),
  lastModifiedTime?: string(name='LastModifiedTime', example='2021-06-10T13:30:20.405878292Z'),
  outputsExpression?: [ 
    {
      help?: string(name='Help'),
      required?: boolean(name='Required', example='true'),
      stepOrder?: long(name='StepOrder', example='2'),
      taskName?: string(name='TaskName', example='jobname'),
      variableName?: string(name='VariableName', example='fastq1'),
      variableType?: string(name='VariableType', example='string'),
      variableValue?: string(name='VariableValue', example='abc_1.fastq.gz'),
    }
  ](name='OutputsExpression'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  revisionTag?: string(name='RevisionTag', example='produceVersion'),
  rootEntity?: string(name='RootEntity', example='test-entity'),
  source?: string(name='Source', example='EasyGene'),
  templateName?: string(name='TemplateName', example='test-template'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model GetTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTemplateResponseBody(name='body'),
}

/**
 * @summary 查询应用模板的详情
 *
 * @param request GetTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTemplateResponse
 */
async function getTemplateWithOptions(request: GetTemplateRequest, runtime: Util.RuntimeOptions): GetTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTemplate',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询应用模板的详情
 *
 * @param request GetTemplateRequest
 * @return GetTemplateResponse
 */
async function getTemplate(request: GetTemplateRequest): GetTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTemplateWithOptions(request, runtime);
}

model GetWorkspaceRequest {
  workspace?: string(name='Workspace', description='This parameter is required.', example='MyTestWorkspace'),
}

model GetWorkspaceResponseBody = {
  bucketName?: string(name='BucketName', example='my-bucket'),
  createTime?: string(name='CreateTime', example='2021-06-16T15:09:14.378297+08:00'),
  description?: string(name='Description', example='This is a test workspace'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  jobLifecycle?: int32(name='JobLifecycle', example='30'),
  labels?: map[string]string(name='Labels'),
  lastModifiedTime?: string(name='LastModifiedTime', example='2021-06-16T15:09:14.378297+08:00'),
  location?: string(name='Location', example='cn-beijing'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  role?: string(name='Role', example='TestRole'),
  status?: string(name='Status', example='Active'),
  storage?: string(name='Storage', example='oss://my-bucket/my-path/'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model GetWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWorkspaceResponseBody(name='body'),
}

/**
 * @summary 查询工作空间详情
 *
 * @param request GetWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWorkspaceResponse
 */
async function getWorkspaceWithOptions(request: GetWorkspaceRequest, runtime: Util.RuntimeOptions): GetWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetWorkspace',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询工作空间详情
 *
 * @param request GetWorkspaceRequest
 * @return GetWorkspaceResponse
 */
async function getWorkspace(request: GetWorkspaceRequest): GetWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWorkspaceWithOptions(request, runtime);
}

model ImportAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='fastp'),
  source?: string(name='Source', description='This parameter is required.', example='easygene:opengene/fastp'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model ImportAppResponseBody = {
  appName?: string(name='AppName', example='InstalledApp'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  regionId?: string(name='RegionId', example='cn-beijing'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model ImportAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportAppResponseBody(name='body'),
}

/**
 * @summary 导入应用。
 *
 * @param request ImportAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportAppResponse
 */
async function importAppWithOptions(request: ImportAppRequest, runtime: Util.RuntimeOptions): ImportAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.source)) {
    query['Source'] = request.source;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ImportApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导入应用。
 *
 * @param request ImportAppRequest
 * @return ImportAppResponse
 */
async function importApp(request: ImportAppRequest): ImportAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return importAppWithOptions(request, runtime);
}

model InstallGlobalAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='joint-calling'),
  installedAppName?: string(name='InstalledAppName', description='This parameter is required.', example='joint-calling'),
  namespaceName?: string(name='NamespaceName', description='This parameter is required.', example='sentieon'),
  source?: string(name='Source', description='This parameter is required.', example='EasyGene'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='default-workspace'),
}

model InstallGlobalAppResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  installedAppName?: string(name='InstalledAppName', example='InstalledApp'),
  regionId?: string(name='RegionId', example='cn-beijing'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model InstallGlobalAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstallGlobalAppResponseBody(name='body'),
}

/**
 * @summary 安装平台公共应用到工作空间中。
 *
 * @param request InstallGlobalAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstallGlobalAppResponse
 */
async function installGlobalAppWithOptions(request: InstallGlobalAppRequest, runtime: Util.RuntimeOptions): InstallGlobalAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.installedAppName)) {
    query['InstalledAppName'] = request.installedAppName;
  }
  if (!Util.isUnset(request.namespaceName)) {
    query['NamespaceName'] = request.namespaceName;
  }
  if (!Util.isUnset(request.source)) {
    query['Source'] = request.source;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InstallGlobalApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 安装平台公共应用到工作空间中。
 *
 * @param request InstallGlobalAppRequest
 * @return InstallGlobalAppResponse
 */
async function installGlobalApp(request: InstallGlobalAppRequest): InstallGlobalAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return installGlobalAppWithOptions(request, runtime);
}

model ListAppsRequest {
  appType?: string(name='AppType', example='App'),
  isReversed?: boolean(name='IsReversed', example='true'),
  labelSelector?: string(name='LabelSelector', example='env=test'),
  language?: string(name='Language', example='WDL'),
  maxResults?: int32(name='MaxResults', example='5'),
  nextToken?: string(name='NextToken', description='Next Token', example='TestToken'),
  orderBy?: string(name='OrderBy', example='createtime'),
  scope?: string(name='Scope', example='Public'),
  search?: string(name='Search', example='TestName'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model ListAppsResponseBody = {
  apps?: [ 
    {
      appDefaultVersion?: string(name='AppDefaultVersion', example='v1'),
      appName?: string(name='AppName', example='TestApp'),
      appType?: string(name='AppType', example='App'),
      createTime?: string(name='CreateTime', example='2021-06-10T13:30:20.414557061Z'),
      description?: string(name='Description', example='This is a test app'),
      labels?: map[string]string(name='Labels'),
      language?: string(name='Language', example='WDL'),
      scope?: string(name='Scope', example='Public'),
      source?: string(name='Source', example='EasyGene'),
      workspace?: string(name='Workspace', example='TestWorkspace'),
    }
  ](name='Apps'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='5'),
  nextToken?: string(name='NextToken', description='Next Token', example='TestToken'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='5'),
}

model ListAppsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAppsResponseBody(name='body'),
}

/**
 * @summary 列出应用
 *
 * @param request ListAppsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAppsResponse
 */
async function listAppsWithOptions(request: ListAppsRequest, runtime: Util.RuntimeOptions): ListAppsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appType)) {
    query['AppType'] = request.appType;
  }
  if (!Util.isUnset(request.isReversed)) {
    query['IsReversed'] = request.isReversed;
  }
  if (!Util.isUnset(request.labelSelector)) {
    query['LabelSelector'] = request.labelSelector;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.scope)) {
    query['Scope'] = request.scope;
  }
  if (!Util.isUnset(request.search)) {
    query['Search'] = request.search;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApps',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出应用
 *
 * @param request ListAppsRequest
 * @return ListAppsResponse
 */
async function listApps(request: ListAppsRequest): ListAppsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppsWithOptions(request, runtime);
}

model ListAuthorizedSoftwareRequest {
  isReversed?: boolean(name='IsReversed', example='true'),
  location?: string(name='Location', description='This parameter is required.', example='cn-shanghai'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
  orderBy?: string(name='OrderBy', example='LastModified'),
  search?: string(name='Search', example='Sentieon'),
}

model ListAuthorizedSoftwareResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  softwares?: [ 
    {
      helpLink?: string(name='HelpLink', example='https://help.aliyun.com/document_detail/257750.html'),
      lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
      locations?: [ string ](name='Locations'),
      promotion?: string(name='Promotion'),
      softwareDefaultVersion?: string(name='SoftwareDefaultVersion', example='201911'),
      softwareDescription?: string(name='SoftwareDescription', example='NGS数据二级分析软件，提供基于CPU的加速方案，可替代BWA，GATK，HaplotypeCaller，Mutect和Mutect2等分析流程。包括DNASeq，DNAScope，TNScope等工具'),
      softwareIcon?: string(name='SoftwareIcon', example='https://img.alicdn.com/imgextra/i2/O1CN01mmZovA1UJfeKQAYvF_!!6000000002497-2-tps-256-256.png'),
      softwareLicenseFee?: float(name='SoftwareLicenseFee', example='0.15'),
      softwareLongName?: string(name='SoftwareLongName', example='Sentieon加速软件'),
      softwareName?: string(name='SoftwareName', example='sentieon'),
      softwareVersions?: [ string ](name='SoftwareVersions'),
    }
  ](name='Softwares'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListAuthorizedSoftwareResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAuthorizedSoftwareResponseBody(name='body'),
}

/**
 * @summary 获取平台第三方软件列表
 *
 * @param request ListAuthorizedSoftwareRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAuthorizedSoftwareResponse
 */
async function listAuthorizedSoftwareWithOptions(request: ListAuthorizedSoftwareRequest, runtime: Util.RuntimeOptions): ListAuthorizedSoftwareResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAuthorizedSoftware',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取平台第三方软件列表
 *
 * @param request ListAuthorizedSoftwareRequest
 * @return ListAuthorizedSoftwareResponse
 */
async function listAuthorizedSoftware(request: ListAuthorizedSoftwareRequest): ListAuthorizedSoftwareResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAuthorizedSoftwareWithOptions(request, runtime);
}

model ListContainerImagesRequest {
  location?: string(name='Location', description='This parameter is required.', example='cn-shanghai'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
}

model ListContainerImagesResponseBody = {
  containerImages?: [ 
    {
      containerImageDescription?: string(name='ContainerImageDescription', example='a suite of programs for interacting with high-throughput sequencing data.'),
      containerImageName?: string(name='ContainerImageName', example='samtools'),
      containerImageNamespace?: string(name='ContainerImageNamespace', example='samtools'),
      containerImageVersions?: [ string ](name='ContainerImageVersions'),
      containerRegistry?: string(name='ContainerRegistry', example='registry-vpc.cn-shenzhen.aliyuncs.com'),
      lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
      location?: string(name='Location', example='cn-shenzhen'),
    }
  ](name='ContainerImages'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListContainerImagesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListContainerImagesResponseBody(name='body'),
}

/**
 * @summary 获取平台公共容器镜像列表
 *
 * @param request ListContainerImagesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListContainerImagesResponse
 */
async function listContainerImagesWithOptions(request: ListContainerImagesRequest, runtime: Util.RuntimeOptions): ListContainerImagesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListContainerImages',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取平台公共容器镜像列表
 *
 * @param request ListContainerImagesRequest
 * @return ListContainerImagesResponse
 */
async function listContainerImages(request: ListContainerImagesRequest): ListContainerImagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listContainerImagesWithOptions(request, runtime);
}

model ListEntitiesRequest {
  isReversed?: boolean(name='IsReversed', example='false'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  orderBy?: string(name='OrderBy', example='createtime'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model ListEntitiesResponseBody = {
  entities?: [ 
    {
      entityType?: string(name='EntityType', example='sample'),
    }
  ](name='Entities'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='1'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='1'),
}

model ListEntitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListEntitiesResponseBody(name='body'),
}

/**
 * @summary 列出数据实体列表
 *
 * @param request ListEntitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListEntitiesResponse
 */
async function listEntitiesWithOptions(request: ListEntitiesRequest, runtime: Util.RuntimeOptions): ListEntitiesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListEntities',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出数据实体列表
 *
 * @param request ListEntitiesRequest
 * @return ListEntitiesResponse
 */
async function listEntities(request: ListEntitiesRequest): ListEntitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEntitiesWithOptions(request, runtime);
}

model ListEntityItemsRequest {
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  isReversed?: boolean(name='IsReversed', example='false'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  orderBy?: string(name='OrderBy', example='createtime'),
  search?: string(name='Search', example='test'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model ListEntityItemsResponseBody = {
  entityItems?: [ 
    {
      entityData?: map[string]string(name='EntityData'),
      entityName?: string(name='EntityName', example='s1'),
    }
  ](name='EntityItems'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListEntityItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListEntityItemsResponseBody(name='body'),
}

/**
 * @summary 列出数据表格的条目
 *
 * @param request ListEntityItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListEntityItemsResponse
 */
async function listEntityItemsWithOptions(request: ListEntityItemsRequest, runtime: Util.RuntimeOptions): ListEntityItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.isReversed)) {
    query['IsReversed'] = request.isReversed;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.search)) {
    query['Search'] = request.search;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListEntityItems',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出数据表格的条目
 *
 * @param request ListEntityItemsRequest
 * @return ListEntityItemsResponse
 */
async function listEntityItems(request: ListEntityItemsRequest): ListEntityItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEntityItemsWithOptions(request, runtime);
}

model ListGlobalAppsRequest {
  appScope?: string(name='AppScope', example='OpenAccess'),
  category?: string(name='Category', example='群体变异'),
  isReversed?: boolean(name='IsReversed', example='true'),
  location?: string(name='Location', example='cn-shenzhen'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
  orderBy?: string(name='OrderBy', example='AppName, LastModified, Used'),
  search?: string(name='Search', example='群体变异'),
  toolkit?: string(name='Toolkit', example='Sentieon'),
}

model ListGlobalAppsResponseBody = {
  globalApps?: [ 
    {
      appDefaultVersion?: string(name='AppDefaultVersion', example='1.0'),
      appDescription?: string(name='AppDescription', example='This is app description.'),
      appFee?: string(name='AppFee', example='实际使用时，计算该应用消耗的资源费用。'),
      appName?: string(name='AppName', example='joint-calling'),
      appScope?: string(name='AppScope', example='OpenAccess'),
      categories?: [ string ](name='Categories'),
      lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
      locations?: [ string ](name='Locations'),
      namespaceName?: string(name='NamespaceName', example='sentieon'),
      pinned?: boolean(name='Pinned', example='true'),
      toolkit?: string(name='Toolkit', example='Sentieon'),
    }
  ](name='GlobalApps'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListGlobalAppsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListGlobalAppsResponseBody(name='body'),
}

/**
 * @summary 获取平台公共应用列表
 *
 * @param request ListGlobalAppsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListGlobalAppsResponse
 */
async function listGlobalAppsWithOptions(request: ListGlobalAppsRequest, runtime: Util.RuntimeOptions): ListGlobalAppsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListGlobalApps',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取平台公共应用列表
 *
 * @param request ListGlobalAppsRequest
 * @return ListGlobalAppsResponse
 */
async function listGlobalApps(request: ListGlobalAppsRequest): ListGlobalAppsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listGlobalAppsWithOptions(request, runtime);
}

model ListPublicDatasetRequest {
  isReversed?: boolean(name='IsReversed', example='true'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
  orderBy?: string(name='OrderBy', example='LastModified, DatasetName'),
  search?: string(name='Search', example='西蒙斯基因组多样性计划'),
  tag?: string(name='Tag', example='遗传多样性'),
}

model ListPublicDatasetResponseBody = {
  datasets?: [ 
    {
      about?: string(name='About', example='This is description about dataset.'),
      accessRequirements?: string(name='AccessRequirements', example='This are access requirements.'),
      copyright?: string(name='Copyright', example='This is copyright.'),
      datasetDescription?: string(name='DatasetDescription', example='This are access requirements'),
      datasetId?: string(name='DatasetId'),
      datasetName?: string(name='DatasetName', example='西蒙斯基因组多样性计划'),
      lastModified?: string(name='LastModified', example='yyyy/MM/dd HH:mm:ss'),
      locations?: [ string ](name='Locations'),
      tags?: [ string ](name='Tags'),
      updateFrequency?: string(name='UpdateFrequency', example='源站更新后及时同步'),
    }
  ](name='Datasets'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListPublicDatasetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublicDatasetResponseBody(name='body'),
}

/**
 * @summary 获取平台公共数据集列表
 *
 * @param request ListPublicDatasetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublicDatasetResponse
 */
async function listPublicDatasetWithOptions(request: ListPublicDatasetRequest, runtime: Util.RuntimeOptions): ListPublicDatasetResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPublicDataset',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取平台公共数据集列表
 *
 * @param request ListPublicDatasetRequest
 * @return ListPublicDatasetResponse
 */
async function listPublicDataset(request: ListPublicDatasetRequest): ListPublicDatasetResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPublicDatasetWithOptions(request, runtime);
}

model ListPublicDatasetEntitiesRequest {
  datasetName?: string(name='DatasetName', description='This parameter is required.', example='西蒙斯基因组多样性计划'),
  isReversed?: boolean(name='IsReversed', example='true'),
  location?: string(name='Location', example='cn-shanghai'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
  orderBy?: string(name='OrderBy', example='LastModified'),
}

model ListPublicDatasetEntitiesResponseBody = {
  datasetName?: string(name='DatasetName', example='西蒙斯基因组多样性计划'),
  entities?: [ 
    {
      entityType?: string(name='EntityType', example='sample'),
    }
  ](name='Entities'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListPublicDatasetEntitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublicDatasetEntitiesResponseBody(name='body'),
}

/**
 * @summary 查询平台公共数据集包含的实体列表
 *
 * @param request ListPublicDatasetEntitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublicDatasetEntitiesResponse
 */
async function listPublicDatasetEntitiesWithOptions(request: ListPublicDatasetEntitiesRequest, runtime: Util.RuntimeOptions): ListPublicDatasetEntitiesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPublicDatasetEntities',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询平台公共数据集包含的实体列表
 *
 * @param request ListPublicDatasetEntitiesRequest
 * @return ListPublicDatasetEntitiesResponse
 */
async function listPublicDatasetEntities(request: ListPublicDatasetEntitiesRequest): ListPublicDatasetEntitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPublicDatasetEntitiesWithOptions(request, runtime);
}

model ListPublicDatasetEntityItemsRequest {
  datasetName?: string(name='DatasetName', description='This parameter is required.', example='西蒙斯基因组多样性计划'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  isReversed?: boolean(name='IsReversed', example='true'),
  location?: string(name='Location', example='cn-shanghai'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
  orderBy?: string(name='OrderBy', example='LastModified'),
  search?: string(name='Search', example='s1'),
}

model ListPublicDatasetEntityItemsResponseBody = {
  datasetName?: string(name='DatasetName', example='西蒙斯基因组多样性计划'),
  entityItems?: [ 
    {
      entityData?: map[string]string(name='EntityData'),
      entityName?: string(name='EntityName', example='sample'),
    }
  ](name='EntityItems'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListPublicDatasetEntityItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublicDatasetEntityItemsResponseBody(name='body'),
}

/**
 * @summary 查询平台公共数据集特定的实体表格数据
 *
 * @param request ListPublicDatasetEntityItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublicDatasetEntityItemsResponse
 */
async function listPublicDatasetEntityItemsWithOptions(request: ListPublicDatasetEntityItemsRequest, runtime: Util.RuntimeOptions): ListPublicDatasetEntityItemsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPublicDatasetEntityItems',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询平台公共数据集特定的实体表格数据
 *
 * @param request ListPublicDatasetEntityItemsRequest
 * @return ListPublicDatasetEntityItemsResponse
 */
async function listPublicDatasetEntityItems(request: ListPublicDatasetEntityItemsRequest): ListPublicDatasetEntityItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPublicDatasetEntityItemsWithOptions(request, runtime);
}

model ListPublicDatasetTagsRequest {
  isReversed?: boolean(name='IsReversed', example='true'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='0f2cc944-67db-4fb1-bb10-f136cda74bda'),
  orderBy?: string(name='OrderBy', example='LastModified'),
  search?: string(name='Search', example='遗传多样性'),
}

model ListPublicDatasetTagsResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='ba6d88e2-a6f2-4d2c-a2ae-68b76b078445'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  tags?: [ string ](name='Tags'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListPublicDatasetTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublicDatasetTagsResponseBody(name='body'),
}

/**
 * @summary 列出所有公共数据集标签
 *
 * @param request ListPublicDatasetTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublicDatasetTagsResponse
 */
async function listPublicDatasetTagsWithOptions(request: ListPublicDatasetTagsRequest, runtime: Util.RuntimeOptions): ListPublicDatasetTagsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPublicDatasetTags',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出所有公共数据集标签
 *
 * @param request ListPublicDatasetTagsRequest
 * @return ListPublicDatasetTagsResponse
 */
async function listPublicDatasetTags(request: ListPublicDatasetTagsRequest): ListPublicDatasetTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPublicDatasetTagsWithOptions(request, runtime);
}

model ListRegionsResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  regions?: [ 
    {
      localName?: string(name='LocalName', example='华北2-北京'),
      regionEndpoint?: string(name='RegionEndpoint', example='easygene.cn-beijing.aliyuncs.com'),
      regionId?: string(name='RegionId', example='cn-beijing'),
    }
  ](name='Regions'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model ListRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRegionsResponseBody(name='body'),
}

/**
 * @summary 查询基因分析平台产品的可用地域。
 *
 * @param request ListRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRegionsResponse
 */
async function listRegionsWithOptions(runtime: Util.RuntimeOptions): ListRegionsResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListRegions',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询基因分析平台产品的可用地域。
 *
 * @return ListRegionsResponse
 */
async function listRegions(): ListRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRegionsWithOptions(runtime);
}

model ListRunsRequest {
  appName?: string(name='AppName', example='MyApp'),
  appRevision?: string(name='AppRevision', example='4.1.4.1-v1.0'),
  entityName?: string(name='EntityName', example='S001'),
  entityType?: string(name='EntityType', example='sample'),
  getTotal?: boolean(name='GetTotal', example='false'),
  isReversed?: boolean(name='IsReversed', example='false'),
  labelSelector?: string(name='LabelSelector', example='env=test'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  orderBy?: string(name='OrderBy', example='createtime'),
  search?: string(name='Search', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
  status?: string(name='Status', example='Running'),
  submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model ListRunsResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  runs?: [ 
    {
      appName?: string(name='AppName', example='MyApp'),
      appRevision?: string(name='AppRevision', example='1'),
      createTime?: string(name='CreateTime', example='2021-06-10T13:30:20.414557061Z'),
      defaultRuntime?: string(name='DefaultRuntime', example='{}'),
      endTime?: string(name='EndTime', example='2021-06-10T13:38:20.414557061Z'),
      entityName?: string(name='EntityName', example='s1'),
      entityType?: string(name='EntityType', example='sample'),
      executeDirectory?: string(name='ExecuteDirectory', example='oss://my-bucket/my-execdir/'),
      executeOptions?: {
        callCaching?: boolean(name='CallCaching', example='false'),
        deleteIntermediateResults?: boolean(name='DeleteIntermediateResults', example='false'),
        failureMode?: string(name='FailureMode', example='NoNewCalls'),
        useRelativeOutputPaths?: boolean(name='UseRelativeOutputPaths', example='false'),
      }(name='ExecuteOptions'),
      inputs?: string(name='Inputs', example='{     "workflow1.task1.param1": "helloooo.txt",     "workflow1.task1.param2": "abc",     "workflow1.task2.param1": "new_helloooo.txt",     "workflow1.task2.param2": "def" }'),
      labels?: map[string]string(name='Labels'),
      regionId?: string(name='RegionId', example='cn-beijing'),
      runId?: string(name='RunId', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
      runName?: string(name='RunName', example='test-run'),
      source?: string(name='Source', example='EasyGene'),
      startTime?: string(name='StartTime', example='2021-06-10T13:31:20.414557061Z'),
      status?: string(name='Status', example='Running'),
      submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
      workspace?: string(name='Workspace', example='test-workspace'),
    }
  ](name='Runs'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListRunsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRunsResponseBody(name='body'),
}

/**
 * @summary 列出任务
 *
 * @param request ListRunsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRunsResponse
 */
async function listRunsWithOptions(request: ListRunsRequest, runtime: Util.RuntimeOptions): ListRunsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListRuns',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出任务
 *
 * @param request ListRunsRequest
 * @return ListRunsResponse
 */
async function listRuns(request: ListRunsRequest): ListRunsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRunsWithOptions(request, runtime);
}

model ListSubmissionsRequest {
  isReversed?: boolean(name='IsReversed', example='true'),
  maxResults?: int32(name='MaxResults', example='5'),
  nextToken?: string(name='NextToken', description='Next Token', example='TestToken'),
  orderBy?: string(name='OrderBy', example='createtime'),
  search?: string(name='Search', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  status?: string(name='Status', example='Failed'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model ListSubmissionsResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='5'),
  nextToken?: string(name='NextToken', example='TestToken'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  submissions?: [ 
    {
      createTime?: string(name='CreateTime', example='2021-06-16T15:09:14.378297+08:00'),
      endTime?: string(name='EndTime', example='2021-06-16T15:09:14.378297+08:00'),
      entityType?: string(name='EntityType', example='TestEntityType'),
      runStats?: {
        aborted?: long(name='Aborted', example='5'),
        aborting?: long(name='Aborting', example='5'),
        failed?: long(name='Failed', example='5'),
        pending?: long(name='Pending', example='5'),
        running?: long(name='Running', example='5'),
        submitted?: long(name='Submitted', example='5'),
        succeeded?: long(name='Succeeded', example='5'),
      }(name='RunStats'),
      startTime?: string(name='StartTime', example='2021-06-16T15:09:14.378297+08:00'),
      status?: string(name='Status', example='Succeeded'),
      submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
      workspace?: string(name='Workspace', example='TestWorkspace'),
    }
  ](name='Submissions'),
  totalCount?: int32(name='TotalCount', example='5'),
}

model ListSubmissionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSubmissionsResponseBody(name='body'),
}

/**
 * @summary 列出投递
 *
 * @param request ListSubmissionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSubmissionsResponse
 */
async function listSubmissionsWithOptions(request: ListSubmissionsRequest, runtime: Util.RuntimeOptions): ListSubmissionsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSubmissions',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出投递
 *
 * @param request ListSubmissionsRequest
 * @return ListSubmissionsResponse
 */
async function listSubmissions(request: ListSubmissionsRequest): ListSubmissionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSubmissionsWithOptions(request, runtime);
}

model ListTemplatesRequest {
  isReversed?: boolean(name='IsReversed', example='false'),
  labelSelector?: string(name='LabelSelector', example='key1=value1'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  orderBy?: string(name='OrderBy', example='createtime'),
  search?: string(name='Search', example='test'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model ListTemplatesResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  templates?: [ 
    {
      appName?: string(name='AppName', example='my-app'),
      appRevision?: string(name='AppRevision', example='1'),
      createTime?: string(name='CreateTime', example='2021-06-10T13:30:20.414557061Z'),
      description?: string(name='Description', example='This is a test template'),
      inputsExpression?: [ 
        {
          help?: string(name='Help', example='help test'),
          required?: boolean(name='Required', example='true'),
          stepOrder?: long(name='StepOrder', example='0'),
          taskName?: string(name='TaskName', example='task1'),
          variableName?: string(name='VariableName', example='fastq1'),
          variableType?: string(name='VariableType', example='File'),
          variableValue?: string(name='VariableValue', example='oss://bucket/file1.fastq'),
        }
      ](name='InputsExpression'),
      labels?: map[string]string(name='Labels'),
      lastModifiedTime?: string(name='LastModifiedTime', example='2021-06-10T13:30:20.414557061Z'),
      outputsExpression?: [ 
        {
          help?: string(name='Help', example='help test'),
          required?: boolean(name='Required', example='true'),
          stepOrder?: long(name='StepOrder', example='1'),
          taskName?: string(name='TaskName', example='task1'),
          variableName?: string(name='VariableName', example='v1'),
          variableType?: string(name='VariableType', example='File'),
          variableValue?: string(name='VariableValue', example='oss://bucket/test.vcf'),
        }
      ](name='OutputsExpression'),
      revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
      rootEntity?: string(name='RootEntity', example='test-entity'),
      templateName?: string(name='TemplateName', example='test-template'),
      workspace?: string(name='Workspace', example='test-workspace'),
    }
  ](name='Templates'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTemplatesResponseBody(name='body'),
}

/**
 * @summary 列出应用模板
 *
 * @param request ListTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTemplatesResponse
 */
async function listTemplatesWithOptions(request: ListTemplatesRequest, runtime: Util.RuntimeOptions): ListTemplatesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.isReversed)) {
    query['IsReversed'] = request.isReversed;
  }
  if (!Util.isUnset(request.labelSelector)) {
    query['LabelSelector'] = request.labelSelector;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.search)) {
    query['Search'] = request.search;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTemplates',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出应用模板
 *
 * @param request ListTemplatesRequest
 * @return ListTemplatesResponse
 */
async function listTemplates(request: ListTemplatesRequest): ListTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTemplatesWithOptions(request, runtime);
}

model ListUserActiveRunsRequest {
  maxResults?: int32(name='MaxResults', example='3'),
}

model ListUserActiveRunsResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='MTIzNDU2P1dvcmtzcGFjZT93cy1mMDE4OTgxNGU1ZTkK'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  runs?: [ 
    {
      appName?: string(name='AppName', example='MyApp'),
      appRevision?: string(name='AppRevision', example='1'),
      createTime?: string(name='CreateTime', example='2021-06-10T13:30:20.414557061Z'),
      defaultRuntime?: string(name='DefaultRuntime', example='{}'),
      endTime?: string(name='EndTime', example='2021-06-10T13:30:20.414557061Z'),
      entityName?: string(name='EntityName', example='s1'),
      entityType?: string(name='EntityType', example='sample'),
      executeDirectory?: string(name='ExecuteDirectory'),
      executeOptions?: {
        callCaching?: boolean(name='CallCaching', example='false'),
        deleteIntermediateResults?: boolean(name='DeleteIntermediateResults', example='false'),
        failureMode?: string(name='FailureMode', example='NoNewCalls'),
        useRelativeOutputPaths?: boolean(name='UseRelativeOutputPaths', example='false'),
      }(name='ExecuteOptions'),
      inputs?: string(name='Inputs', example='{ "workflow1.task1.param1": "helloooo.txt", "workflow1.task1.param2": "abc", "workflow1.task2.param1": "new_helloooo.txt", "workflow1.task2.param2": "def" }'),
      labels?: map[string]string(name='Labels'),
      regionId?: string(name='RegionId', example='cn-beijing'),
      runId?: string(name='RunId', example='run-13BeYuxc0fxO24uA75UppTiMRoQ'),
      runName?: string(name='RunName', example='test-run'),
      source?: string(name='Source', example='EasyGene'),
      startTime?: string(name='StartTime', example='2021-06-10T13:30:20.414557061Z'),
      status?: string(name='Status', example='Running'),
      submissionId?: string(name='SubmissionId', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
      workspace?: string(name='Workspace', example='test-workspace'),
    }
  ](name='Runs'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListUserActiveRunsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserActiveRunsResponseBody(name='body'),
}

/**
 * @summary 最近任务列表
 *
 * @param request ListUserActiveRunsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserActiveRunsResponse
 */
async function listUserActiveRunsWithOptions(request: ListUserActiveRunsRequest, runtime: Util.RuntimeOptions): ListUserActiveRunsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserActiveRuns',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 最近任务列表
 *
 * @param request ListUserActiveRunsRequest
 * @return ListUserActiveRunsResponse
 */
async function listUserActiveRuns(request: ListUserActiveRunsRequest): ListUserActiveRunsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserActiveRunsWithOptions(request, runtime);
}

model ListWorkspacesRequest {
  isReversed?: boolean(name='IsReversed', example='true'),
  labelSelector?: string(name='LabelSelector', example='env=test'),
  maxResults?: int32(name='MaxResults', example='5'),
  nextToken?: string(name='NextToken', description='NextToken', example='TestToken'),
  orderBy?: string(name='OrderBy', example='createtime'),
  search?: string(name='Search', example='TestName'),
}

model ListWorkspacesResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  maxResults?: int32(name='MaxResults', example='5'),
  nextToken?: string(name='NextToken', example='TestToken'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  totalCount?: int32(name='TotalCount', example='5'),
  workspaces?: [ 
    {
      bucketName?: string(name='BucketName', example='my-bucket'),
      createTime?: string(name='CreateTime', example='2021-06-16T15:09:14.378297+08:00'),
      description?: string(name='Description', example='This is a test workspace'),
      jobLifecycle?: int32(name='JobLifecycle', example='30'),
      labels?: map[string]string(name='Labels'),
      lastModifiedTime?: string(name='LastModifiedTime', example='2021-06-16T15:09:14.378297+08:00'),
      location?: string(name='Location', example='cn-beijing'),
      role?: string(name='Role', description='RAM Role', example='TestRole'),
      status?: string(name='Status', example='Active'),
      storage?: string(name='Storage', example='oss://my-bucket/my-path/'),
      workspace?: string(name='Workspace', example='TestWorkspace'),
    }
  ](name='Workspaces'),
}

model ListWorkspacesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListWorkspacesResponseBody(name='body'),
}

/**
 * @summary 列出工作空间
 *
 * @param request ListWorkspacesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListWorkspacesResponse
 */
async function listWorkspacesWithOptions(request: ListWorkspacesRequest, runtime: Util.RuntimeOptions): ListWorkspacesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListWorkspaces',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出工作空间
 *
 * @param request ListWorkspacesRequest
 * @return ListWorkspacesResponse
 */
async function listWorkspaces(request: ListWorkspacesRequest): ListWorkspacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listWorkspacesWithOptions(request, runtime);
}

model ResumeSubmissionRequest {
  submissionId?: string(name='SubmissionId', description='This parameter is required.', example='sub-13BeXWnGvrOl3MC124tazcJVKaV'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model ResumeSubmissionResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model ResumeSubmissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResumeSubmissionResponseBody(name='body'),
}

/**
 * @summary 恢复投递
 *
 * @param request ResumeSubmissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumeSubmissionResponse
 */
async function resumeSubmissionWithOptions(request: ResumeSubmissionRequest, runtime: Util.RuntimeOptions): ResumeSubmissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.submissionId)) {
    query['SubmissionId'] = request.submissionId;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResumeSubmission',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 恢复投递
 *
 * @param request ResumeSubmissionRequest
 * @return ResumeSubmissionResponse
 */
async function resumeSubmission(request: ResumeSubmissionRequest): ResumeSubmissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeSubmissionWithOptions(request, runtime);
}

model TagAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='TestApp'),
  appRevision?: string(name='AppRevision', description='This parameter is required.', example='1'),
  revisionTag?: string(name='RevisionTag', description='This parameter is required.', example='ProduceVersion'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='TestWorkspace'),
}

model TagAppResponseBody = {
  appName?: string(name='AppName', example='TestApp'),
  appRevision?: string(name='AppRevision', example='1'),
  formerRevision?: string(name='FormerRevision', example='0'),
  formerTag?: string(name='FormerTag', example='TestTag'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  revisionTag?: string(name='RevisionTag', example='ProduceVersion'),
  workspace?: string(name='Workspace', example='TestWorkspace'),
}

model TagAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagAppResponseBody(name='body'),
}

/**
 * @summary 应用版本打标
 *
 * @param request TagAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagAppResponse
 */
async function tagAppWithOptions(request: TagAppRequest, runtime: Util.RuntimeOptions): TagAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appRevision)) {
    query['AppRevision'] = request.appRevision;
  }
  if (!Util.isUnset(request.revisionTag)) {
    query['RevisionTag'] = request.revisionTag;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagApp',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 应用版本打标
 *
 * @param request TagAppRequest
 * @return TagAppResponse
 */
async function tagApp(request: TagAppRequest): TagAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagAppWithOptions(request, runtime);
}

model UpdateEntityRequest {
  entityItems?: [ 
    {
      entityData?: map[string]string(name='EntityData'),
      entityName?: string(name='EntityName', example='s1'),
    }
  ](name='EntityItems', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UpdateEntityShrinkRequest {
  entityItemsShrink?: string(name='EntityItems', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UpdateEntityResponseBody = {
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model UpdateEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateEntityResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI UpdateEntity is deprecated, please use EasyGene::2021-03-15::UpdateEntityItems instead.
 *
 * @summary 修改数据表格
 *
 * @param tmpReq UpdateEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateEntityResponse
 */
// Deprecated
async function updateEntityWithOptions(tmpReq: UpdateEntityRequest, runtime: Util.RuntimeOptions): UpdateEntityResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateEntityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.entityItems)) {
    request.entityItemsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.entityItems, 'EntityItems', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.entityItemsShrink)) {
    body['EntityItems'] = request.entityItemsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI UpdateEntity is deprecated, please use EasyGene::2021-03-15::UpdateEntityItems instead.
 *
 * @summary 修改数据表格
 *
 * @param request UpdateEntityRequest
 * @return UpdateEntityResponse
 */
// Deprecated
async function updateEntity(request: UpdateEntityRequest): UpdateEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEntityWithOptions(request, runtime);
}

model UpdateEntityItemsRequest {
  entityItems?: [ 
    {
      entityData?: map[string]string(name='EntityData'),
      entityName?: string(name='EntityName', example='s1'),
    }
  ](name='EntityItems', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UpdateEntityItemsShrinkRequest {
  entityItemsShrink?: string(name='EntityItems', description='This parameter is required.'),
  entityType?: string(name='EntityType', description='This parameter is required.', example='sample'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UpdateEntityItemsResponseBody = {
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model UpdateEntityItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateEntityItemsResponseBody(name='body'),
}

/**
 * @summary 修改表格数据
 *
 * @param tmpReq UpdateEntityItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateEntityItemsResponse
 */
async function updateEntityItemsWithOptions(tmpReq: UpdateEntityItemsRequest, runtime: Util.RuntimeOptions): UpdateEntityItemsResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateEntityItemsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.entityItems)) {
    request.entityItemsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.entityItems, 'EntityItems', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.entityItemsShrink)) {
    body['EntityItems'] = request.entityItemsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEntityItems',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改表格数据
 *
 * @param request UpdateEntityItemsRequest
 * @return UpdateEntityItemsResponse
 */
async function updateEntityItems(request: UpdateEntityItemsRequest): UpdateEntityItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEntityItemsWithOptions(request, runtime);
}

model UpdateTemplateRequest {
  description?: string(name='Description', example='This is a test template'),
  inputsExpression?: [ 
    {
      help?: string(name='Help'),
      required?: boolean(name='Required', description='This parameter is required.', example='True'),
      stepOrder?: int32(name='StepOrder', example='2'),
      taskName?: string(name='TaskName', description='This parameter is required.', example='Task1'),
      variableName?: string(name='VariableName', description='This parameter is required.', example='fastq1'),
      variableType?: string(name='VariableType', description='This parameter is required.', example='String'),
      variableValue?: string(name='VariableValue', description='This parameter is required.', example='read_1.fastq.gz'),
    }
  ](name='InputsExpression', description='This parameter is required.'),
  labels?: string(name='Labels', example='{"key": "value"}'),
  outputsExpression?: [ 
    {
      help?: string(name='Help'),
      required?: boolean(name='Required', description='This parameter is required.', example='True'),
      stepOrder?: int32(name='StepOrder'),
      taskName?: string(name='TaskName', description='This parameter is required.', example='Task1'),
      variableName?: string(name='VariableName', description='This parameter is required.', example='Bam'),
      variableType?: string(name='VariableType', description='This parameter is required.', example='String'),
      variableValue?: string(name='VariableValue', description='This parameter is required.', example='out.bam'),
    }
  ](name='OutputsExpression', description='This parameter is required.'),
  rootEntity?: string(name='RootEntity', example='test-entity'),
  templateName?: string(name='TemplateName', description='This parameter is required.', example='test-template'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UpdateTemplateShrinkRequest {
  description?: string(name='Description', example='This is a test template'),
  inputsExpressionShrink?: string(name='InputsExpression', description='This parameter is required.'),
  labels?: string(name='Labels', example='{"key": "value"}'),
  outputsExpressionShrink?: string(name='OutputsExpression', description='This parameter is required.'),
  rootEntity?: string(name='RootEntity', example='test-entity'),
  templateName?: string(name='TemplateName', description='This parameter is required.', example='test-template'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UpdateTemplateResponseBody = {
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
}

model UpdateTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateTemplateResponseBody(name='body'),
}

/**
 * @summary 修改应用模板
 *
 * @param tmpReq UpdateTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateTemplateResponse
 */
async function updateTemplateWithOptions(tmpReq: UpdateTemplateRequest, runtime: Util.RuntimeOptions): UpdateTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.inputsExpression)) {
    request.inputsExpressionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.inputsExpression, 'InputsExpression', 'json');
  }
  if (!Util.isUnset(tmpReq.outputsExpression)) {
    request.outputsExpressionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.outputsExpression, 'OutputsExpression', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.rootEntity)) {
    query['RootEntity'] = request.rootEntity;
  }
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.inputsExpressionShrink)) {
    body['InputsExpression'] = request.inputsExpressionShrink;
  }
  if (!Util.isUnset(request.outputsExpressionShrink)) {
    body['OutputsExpression'] = request.outputsExpressionShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateTemplate',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改应用模板
 *
 * @param request UpdateTemplateRequest
 * @return UpdateTemplateResponse
 */
async function updateTemplate(request: UpdateTemplateRequest): UpdateTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateTemplateWithOptions(request, runtime);
}

model UpdateWorkspaceRequest {
  description?: string(name='Description', example='This is a test workspace'),
  jobLifecycle?: int32(name='JobLifecycle', example='30'),
  labels?: string(name='Labels', example='{"env":"test"}'),
  role?: string(name='Role', example='MyTestRamRole'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='MyTestWorkspace'),
}

model UpdateWorkspaceResponseBody = {
  hostId?: string(name='HostId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  requestId?: string(name='RequestId', example='easygene.cn-beijing.aliyuncs.com'),
}

model UpdateWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateWorkspaceResponseBody(name='body'),
}

/**
 * @summary 修改工作空间
 *
 * @param request UpdateWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateWorkspaceResponse
 */
async function updateWorkspaceWithOptions(request: UpdateWorkspaceRequest, runtime: Util.RuntimeOptions): UpdateWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.jobLifecycle)) {
    query['JobLifecycle'] = request.jobLifecycle;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.role)) {
    query['Role'] = request.role;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateWorkspace',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改工作空间
 *
 * @param request UpdateWorkspaceRequest
 * @return UpdateWorkspaceResponse
 */
async function updateWorkspace(request: UpdateWorkspaceRequest): UpdateWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateWorkspaceWithOptions(request, runtime);
}

model UploadEntityRequest {
  entityCSVFile?: string(name='EntityCSVFile', description='This parameter is required.', example='https://my-bucket.oss.aliyucs.com/entity.csv'),
  workspace?: string(name='Workspace', description='This parameter is required.', example='test-workspace'),
}

model UploadEntityResponseBody = {
  entityType?: string(name='EntityType', example='sample'),
  hostId?: string(name='HostId', example='easygene.cn-beijing.aliyuncs.com'),
  requestId?: string(name='RequestId', example='DA980AD0-158F-44F3-847D-5EAB96C0EB6B'),
  workspace?: string(name='Workspace', example='test-workspace'),
}

model UploadEntityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadEntityResponseBody(name='body'),
}

/**
 * @summary 上传数据表格
 *
 * @param request UploadEntityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadEntityResponse
 */
async function uploadEntityWithOptions(request: UploadEntityRequest, runtime: Util.RuntimeOptions): UploadEntityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.entityCSVFile)) {
    query['EntityCSVFile'] = request.entityCSVFile;
  }
  if (!Util.isUnset(request.workspace)) {
    query['Workspace'] = request.workspace;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadEntity',
    version = '2021-03-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 上传数据表格
 *
 * @param request UploadEntityRequest
 * @return UploadEntityResponse
 */
async function uploadEntity(request: UploadEntityRequest): UploadEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadEntityWithOptions(request, runtime);
}

